<?php

namespace Tictactoe;

class Tool
{
    /**
     * Return value for oponent
     * 
     * @param int $playerValue
     * @return int
     */
    public static function getOponentValue($playerValue) {
        $playerValue = (int)$playerValue;
        if ($playerValue == 1) {
            return 2;
        }
        return 1;
    }
    
    public static function arrayColumn($array, $column) {
        $res = array();
        foreach($array as $one) {
            $res[] = $one[$column];
        }
        return $res;
    }
}